package main

import "fmt"

type Man struct {
	age,height int
}

func main() {
	const NAME = "STEVEN"
	//NAME = "Daniel" //error: can not assign to NAME
	//man :=Man{30,177}
	//const PERSON  = man // error: man is not a const
	const (
		//X ERROR :Missing Value
		X = "A"
		Y
		A = 10
		B
		C
	)
	// print 10
	fmt.Println(A)
	fmt.Println(B)
	fmt.Println(C)
	fmt.Println(X)
	fmt.Println(Y)
	fmt.Println(Y)

	const(
		L = iota
		M = iota
		N = iota
	)

	const(
		L1 = iota  //0
		M1
		N1
	)

	const(
		L2 = "steven"  //0
		M2 = iota      //1
		N2 				//2
	)


	fmt.Println(L,M,N)   //print 0 1 2
	fmt.Println(L1,M1,N1)   //print 0 1 2
	fmt.Println(L2,M2,N2)   //print steven 1 2


	const(
		i = 1<<iota   // 1*2^iota   3<<2 = 3*2^2 = 12    iota = 0
		j = 3<<iota   //3*2^1							iota = 1
		k				// default 3<<iota  			iota = 2
		l				// default  3<<iota				iota = 3
	)

	fmt.Println(i,j,k,l)


	const (
		a1 = '一'	//Unicode code  iota = 0
		b1			//b1 = a1 	iota = 1
		c1 = iota   //iota wei 2
		d1			//default d1 = iota  iota = 3
	)

	fmt.Println(a1,b1,c1,d1)
}
